﻿#region License
/* ---------------------------------------------------------------- *
 *
 * This file is part of the Xcoordination Application Space
 * ("XcoAppSpace") http://www.xcoordination.com
 *
 * Copyright (C) 2009 Xcoordination http://www.xcoordination.com
 *
 * XcoAppSpace is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General
 * Public License as published by the Free Software Foundation.
 *
 * XcoAppSpace is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/
 * or write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * ---------------------------------------------------------------- */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;

namespace XcoAppSpaces.Core.CcrWiring.CcrRemote
{
	///// <summary>
	///// Class that holds information about a port - is only registered at a port as receiver
	///// to allow accessing this information via the IPort.GetRemotableTask() extension method.
	///// </summary>
	//class RemotePortInfoTask : ReceiverTask, IRemotableTask
	//{
	//	private readonly IRemotableTask baseTask;

	//	public RemotePortInfoTask(IRemotableTask baseTask)
	//	{
	//		this.baseTask = baseTask;
	//	}

	//	#region IRemotableTask Members

	//	public string CommServiceName
	//	{
	//		get { return baseTask.CommServiceName; }
	//	}

	//	public Guid PortGuid
	//	{
	//		get { return baseTask.PortGuid; }
	//	}

	//	public string RemoteAddress
	//	{
	//		get { return baseTask.RemoteAddress; }
	//	}

	//	public void Send(object item, Port<Exception> commErrorPort, IPort commAckPort)
	//	{
	//		baseTask.Send(item, commErrorPort, commAckPort);
	//	}

	//	#endregion

	//	public override void Cleanup(ITask taskToCleanup)
	//	{
	//		//nothing to do
	//	}

	//	public override void Consume(IPortElement item)
	//	{
	//		//nothing to do
	//	}

	//	public override bool Evaluate(IPortElement messageNode, ref ITask deferredTask)
	//	{
	//		return false; //the ReceiverTask should never process a port item, and therefore always evaluates to false
	//	}
	//}
}
